home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 18
/
CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso
/
CUCD
/
Programming
/
AmigaE
/
Src
/
Various
/
2ndMousePort.e
next >
Wrap
Text File
|
1992-09-02
|
703b
|
29 lines
-> switches mouseports
OPT OSVERSION=37
MODULE 'devices/input', 'exec/io'
PROC main()
DEF request=NIL:PTR TO iostd,port=NIL
IF port:=CreateMsgPort()
IF request:=CreateIORequest(port,SIZEOF iostd)
IF OpenDevice('input.device',0,request,0)=0
request.command:=IND_SETMPORT
request.data:=[1]:CHAR -> 0 for original port, 1 for joyport
request.length:=1
DoIO(request)
CloseDevice(request)
ELSE
PutStr('Could not open input device\n')
ENDIF
DeleteIORequest(request)
ELSE
PutStr('Could not create iorequest\n')
ENDIF
DeleteMsgPort(port)
ELSE
PutStr('Could not open port\n')
ENDIF
ENDPROC